libxc: don't read uninitialized size value in xc_read_image
authorMatthew Daley <mattjd@gmail.com>
Wed, 30 Oct 2013 07:51:42 +0000 (20:51 +1300)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 31 Oct 2013 22:13:52 +0000 (22:13 +0000)
commitbbf891bcd1841bc61d0726d11988b8c9bf8d6757
tree9dc0f21ee6642c71dc7ae8da0a946f54925e952e
parent96be5eab5d58e209f24c02dd1cdc54e56d7e0803
libxc: don't read uninitialized size value in xc_read_image

This error case can only be triggered by gzread returning 0 (and having
not read anything), so move it there.

Coverity-ID: 1056076
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxc/xg_private.c